package month4.day19;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class C4 {
    public static void main(String[] args) {
        List list=new ArrayList();
        for (int i=0;i<10;i++){
            list.add((int)(Math.random()*10));
        }
        System.out.println(list);
        Iterator in=list.iterator();
        while (in.hasNext()){
            if (((int)in.next())%2==0){
                in.remove();
            }
        }
        System.out.println(list);
    }
}
